<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PlaceCategoryManagement.ascx.cs" Inherits="admin_PlaceCategoryManagement" %>
<asp:Panel ID="pnlAddBox" runat="server" Visible="False">
<table>
    <tr>
        <td style="width: 111px; height: 26px">
            <asp:Label ID="Label1" runat="server" Text="Name:"></asp:Label></td>
        <td style="width: 200px; height: 26px">
            <asp:TextBox ID="txtName" runat="server"></asp:TextBox></td>
        <td style="width: 100px; height: 26px">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
                ErrorMessage="Please specify name for the category" ValidationGroup="A">*</asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td style="width: 111px">
            <asp:Label ID="Label4" runat="server" Text="State:"></asp:Label></td>
        <td style="width: 200px">
            <asp:CheckBox ID="chkState" runat="server" ValidationGroup="A" /></td>
        <td style="width: 100px">
        </td>
    </tr>
    <tr>
        <td style="width: 111px">
        </td>
        <td style="width: 200px">
            <asp:LinkButton ID="lnkAdd" OnClick="lnkAdd_Click" runat="server" CssClass="c_button" ValidationGroup="A">Add</asp:LinkButton>
            <asp:LinkButton ID="lnkHide" runat="server" OnClick="lnkHide_Click" CssClass="c_button">Hide</asp:LinkButton></td>
        <td style="width: 100px">
        </td>
    </tr>
    
    <tr>
    </tr>
</table>
</asp:Panel>
<asp:Label ID="Label2" runat="server" CssClass="admin_table_caption" Text=" List of categories:"></asp:Label><br />
<asp:GridView ID="dgrPlaceCate" runat="server" DataKeyNames="Id" AutoGenerateColumns="False" CssClass="list_table" OnRowCancelingEdit="dgrPlaceCate_RowCancelingEdit" OnRowDeleting="dgrPlaceCate_RowDeleting" OnRowEditing="dgrPlaceCate_RowEditing" OnRowUpdating="dgrPlaceCate_RowUpdating">
    <Columns>
        <asp:TemplateField HeaderText="Name">
            <EditItemTemplate>
                <asp:TextBox ID="txtRowName" runat="server" Text='<%#Bind("Name") %>' />
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="lblName" runat="server" Text='<%#Bind("Name") %>' />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="State" ItemStyle-HorizontalAlign="center">
            <EditItemTemplate>
                <asp:CheckBox ID="chkRowState" runat="server" Checked='<%#Bind("State") %>' />
            </EditItemTemplate>
            <ItemTemplate>
                <asp:CheckBox ID="chkRowState" Enabled="false" runat="server" Checked='<%#Bind("State") %>' />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:CommandField ShowEditButton="True" />
        <asp:CommandField ShowDeleteButton="True" />
    </Columns>
</asp:GridView>
<asp:LinkButton ID="lnkAddForm" runat="server" CssClass="lnkDelete" OnClick="lnkAddForm_Click">Add new</asp:LinkButton>
<script type="text/javascript" language="javascript">    
	window.location.hash="<%=ActiveAccording %>";
</script>